<html>

<!--   DTD or Date & time info
       Version 1.0  July 29th, 2005
       multiline comments
 -->


<!-- ARCHIVE by GEOCITIES.WS -->
<head>
  <title>Printing Three Columns using GW-BASIC</title>
</head>

<!--  the "LessThanBangDashDash" + "DashDashGreaterThan"
      is a nondisplaying comment
-->

<a name="top"></a>

<center><h1>3 Column Printing</h1></center>
<center><h4>for the family using</h4></center>
<center><h1>GW-BASIC</h1></center>

Page 1 of the <a href="bindex.html">Last Book of GW-BASIC</a><br>
Back to the GW-BASIC <a href="btoc.html">Table of Contents</a><br>
All the way back to <a href="index-2.html">Frankenbook</a>

<body><script type="text/javascript" src="../js/policy.js"></script>
<center><script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=728&amp;height=90"></script>
</center>
<!--script type="text/javascript" src="/js/AdBoxDiv.js"></script-->
<script type="text/javascript">
adserver();
window.onload=function(){
html = document.body.innerHTML;

checkPolicy(html);
if ((displayif == 0) && (adstring != null)) {
document.getElementById("footeraddiv").innerHTML = adstring;
}
}
</script>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-26341965-1']);
  _gaq.push(['_setDomainName', '.geocities.ws']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>


<script type="text/javascript">
<!--
 H4jewqpdjh6y = /geocities\.ws$|geocities\.ws\/$|geocities\.ws\/index\.php|geocities\.ws\/archive|geocities\.ws\/search|geocities\.ws\/terms-of-use\.php|geocities\.ws\/terms-of-service\.php|geocities\.ws\/about\.php/i;
        t48193jfrdsswdsq = document.URL;
        H4jewqpdjh6yfound = t48193jfrdsswdsq.search(H4jewqpdjh6y);
	
if(H4jewqpdjh6yfound == -1){
	document.write("<center><ins data-revive-zoneid=\"1\" data-revive-id=\"249a85bd1b1946c71ef2de94958ed350\"><\/ins><script async src=\"\/\/147.135.187.149\/ads\/www\/delivery\/asyncjs.php\"><\/script><\/center><br>");
}
//-->
</script>

<!-- following code added by server. PLEASE REMOVE -->
<!-- preceding code added by server. PLEASE REMOVE -->

<hr>

<pre>
All we are doing here is putting lines that are twenty-five
characters long side by side.  We read the lines into an
array and pick off the requisite line to send to the 
printer.  no big deal. but really, who needs it?  it is here
just mainly to show you that it can be done either in 
portrait or landscape mode.  For landscape just adjust the
line length and numbers of lines per page.

For a normal page of 54 lines there should be 162 lines of
little shorty lines. (25 characters/line) Empty column lines
are just missing data lines within the loaded array.  Yawn...
handy stuff...  here i swiped that test data from the label
program.  getting lazy...

10   ' a three column page blank by fhb4family
20 DATA "1Dear Sirs:              "
30 DATA "2                        "
40 DATA "3this letter is a test   "
50 DATA "4letter to show you how  "
60 DATA "5you can use GW-BASIC to "
70 DATA "6write a nice 3 column   "
80 DATA "7letter to someone who is"
90 DATA "8not to picky about just "
100 DATA "9ow bad the three column "
110 DATA "10letter looks.          "
120 DATA "11                       "
130 DATA "3 2LLLLLLLLLLLLLLLLLLLLLL"
140 DATA "3 3456789 123456789 12345"
150 DATA "3 4LLLLLLLLLLLLLLLLLLLLLL"
160 DATA "B3                       "
170 DATA "T4                       "
180 DATA "4 2LLLLLLLLLLLLLLLLLLLLLL"
190 DATA "4 3356789 123456789 12345"
200 DATA "4 4LLLLLLLLLLLLLLLLLLLLLL"
210 DATA "B4                       "
220 DATA "T5                       "
230 DATA "5 2LLLLLLLLLLLLLLLLLLLLLL"
240 DATA "5 3456789 123456789 12345"
250 DATA "5 4LLLLLLLLLLLLLLLLLLLLLL"
260 DATA "B5                       "
270 DATA "T6                       "
280 DATA "6 2LLLLLLLLLLLLLLLLLLLLLL"
290 DATA "6 3456789 123456789 12345"
300 DATA "6 4LLLLLLLLLLLLLLLLLLLLLL"
310 DATA "B6                       "
320 DATA "T7                       "
330 DATA "7 2LLLLLLLLLLLLLLLLLLLLLL"
340 DATA "7 3456789 123456789 12345"
350 DATA "7 4LLLLLLLLLLLLLLLLLLLLLL"
360 DATA "B7                       "
370 DATA "T8                       "
380 DATA "8 2LLLLLLLLLLLLLLLLLLLLLL"
390 DATA "8 3456789 123456789 12345"
400 DATA "8 4LLLLLLLLLLLLLLLLLLLLLL"
410 DATA "B8                       "
420 DATA "T9                       "
430 DATA "9 2LLLLLLLLLLLLLLLLLLLLLL"
440 DATA "9 3456789 123456789 12345"
450 DATA "9 4LLLLLLLLLLLLLLLLLLLLLL"
460 DATA "B9                       "
470 DATA "T10                      "
480 DATA "10 2LLLLLLLLLLLLLLLLLLLLL"
490 DATA "10 356789 123456789 12345"
500 DATA "10 4LLLLLLLLLLLLLLLLLLLLL"
510 DATA "B10                      "
520 DATA "T11                      "
530 DATA "11 2LLLLLLLLLLLLLLLLLLLLL"
540 DATA "11 356789 123456789 12345"
550 DATA "11 4LLLLLLLLLLLLLLLLLLLLL"
560 DATA "B11                      "
570 DATA "T12                      "
580 DATA "12 2LLLLLLLLLLLLLLLLLLLLL"
590 DATA "12 356789 123456789 12345"
600 DATA "12 4LLLLLLLLLLLLLLLLLLLLL"
610 DATA "B12                      "
620 DATA "T13                      "
630 DATA "13 2LLLLLLLLLLLLLLLLLLLLL"
640 DATA "13 356789 123456789 12345"
650 DATA "13 4LLLLLLLLLLLLLLLLLLLLL"
660 DATA "B13                      "
670 DATA "T14                      "
680 DATA "14 2LLLLLLLLLLLLLLLLLLLLL"
690 DATA "14 356789 123456789 12345"
700 DATA "14 4LLLLLLLLLLLLLLLLLLLLL"
710 DATA "B14                      "
720 DATA "T15                      "
730 DATA "15 2LLLLLLLLLLLLLLLLLLLLL"
740 DATA "15 356789 123456789 12345"
750 DATA "15 4LLLLLLLLLLLLLLLLLLLLL"
760 DATA "B15                      "
770 DATA "T16                      "
780 DATA "16 2LLLLLLLLLLLLLLLLLLLLL"
790 DATA "16 356789 123456789 12345"
800 DATA "16 4LLLLLLLLLLLLLLLLLLLLL"
810 DATA "B16                      "
820 DATA "T17                      "
830 DATA "17 2LLLLLLLLLLLLLLLLLLLLL"
840 DATA "17 356789 123456789 12345"
850 DATA "17 4LLLLLLLLLLLLLLLLLLLLL"
860 DATA "B17                      "
870 DATA "T18                      "
880 DATA "18 2LLLLLLLLLLLLLLLLLLLLL"
890 DATA "18 356789 123456789 12345"
900 DATA "18 4LLLLLLLLLLLLLLLLLLLLL"
910 DATA "B18                      "
920 DATA "T19                      "
930 DATA "19 2LLLLLLLLLLLLLLLLLLLLL"
940 DATA "19 356789 123456789 12345"
950 DATA "19 4LLLLLLLLLLLLLLLLLLLLL"
960 DATA "B19                      "
970 DATA "T20                      "
980 DATA "20 2LLLLLLLLLLLLLLLLLLLLL"
990 DATA "20 356789 123456789 12345"
1000 DATA "20 4LLLLLLLLLLLLLLLLLLLLL"
1010 DATA "B20                      "
1020 DATA "T21                      "
1030 DATA "21 2LLLLLLLLLLLLLLLLLLLLL"
1040 DATA "21 356789 123456789 12345"
1050 DATA "21 4LLLLLLLLLLLLLLLLLLLLL"
1060 DATA "B21                      "
1070 DATA "T22                      "
1080 DATA "22 2LLLLLLLLLLLLLLLLLLLLL"
1090 DATA "22 356789 123456789 12345"
1100 DATA "22 4LLLLLLLLLLLLLLLLLLLLL"
1110 DATA "B22                      "
1120 DATA "T23                      "
1130 DATA "23 2LLLLLLLLLLLLLLLLLLLLL"
1140 DATA "23 356789 123456789 12345"
1150 DATA "23 4LLLLLLLLLLLLLLLLLLLLL"
1160 DATA "B23                      "
1170 DATA "T24                      "
1180 DATA "24 2LLLLLLLLLLLLLLLLLLLLL"
1190 DATA "24 356789 123456789 12345"
1200 DATA "24 4LLLLLLLLLLLLLLLLLLLLL"
1210 DATA "B24                      "
1220 DATA "T25                      "
1230 DATA "25 2LLLLLLLLLLLLLLLLLLLLL"
1240 DATA "25 356789 123456789 12345"
1250 DATA "25 4LLLLLLLLLLLLLLLLLLLLL"
1260 DATA "B25                      "
1270 DATA "T26                      "
1280 DATA "26 2LLLLLLLLLLLLLLLLLLLLL"
1290 DATA "26 356789 123456789 12345"
1300 DATA "26 4LLLLLLLLLLLLLLLLLLLLL"
1310 DATA "B26                      "
1320 DATA "T27                      "
1330 DATA "27 2LLLLLLLLLLLLLLLLLLLLL"
1340 DATA "27 356789 123456789 12345"
1350 DATA "27 4LLLLLLLLLLLLLLLLLLLLL"
1360 DATA "B27                      "
1370 DATA "T28                      "
1380 DATA "28 2LLLLLLLLLLLLLLLLLLLLL"
1390 DATA "28 356789 123456789 12345"
1400 DATA "28 4LLLLLLLLLLLLLLLLLLLLL"
1410 DATA "B28                      "
1420 DATA "T29                      "
1430 DATA "29 2LLLLLLLLLLLLLLLLLLLLL"
1440 DATA "29 356789 123456789 12345"
1450 DATA "29 4LLLLLLLLLLLLLLLLLLLLL"
1460 DATA "B29                      "
1470 DATA "T30                      "
1480 DATA "30 2LLLLLLLLLLLLLLLLLLLLL"
1490 DATA "30 346789 123456789 12345"
1500 DATA "30 346789 123456789 12345"
1510 DATA "30 346789 123456789 12345"
1520 DATA "30 346789 123456789 12345"
1530 DATA "30 346789 123456789 12345"
1540 DATA "30 4LLLLLLLLLLLLLLLLLLLLL"
1550 DATA "30 4LLLLLLLLLLLLLLLLLLLLL"
1560 DATA "When in the course of old"
1570 DATA "human events it becomes a"
1580 DATA "good idea to take a nap  "
1590 DATA "one should always look at"
1600 DATA "a nice quite spot to try "
1610 DATA "and snooze.              "
1620 DATA "                         "
1630 DATA "Respectfully, Joe Sixpack"
1640 'End of data statements
1650 '
1660 '======3 column page program starts here================
1670 '
1680 '3ColumnProgramStartsHere:
1690 GOSUB 1740   'VariableAssignments
1700 GOSUB 1810   'load 150 data elements into array A$(150)
1710 GOSUB 1890   'Print3ColumnSentences
1720 END          'end of the program...
1730 '
1740 'VariableAssignments:
1750 DIM A$(162)   'create string array that holds sentence data
1760 T1=1          'set first column tab
1770 T2=28         'set second column tab
1780 T3=55         'set third column tab
1790 RETURN' to program
1800 '
1810 'LoadColumnData:
1820 I=1           'set counter I to 1
1830 WHILE I<163   'set incrementing parameter
1840   READ A$(I)  'load the sentence lines (data)into the array
1850   I=I+1       'increment the counter
1860   WEND        '^^^^^^^^^^^^^^^loop to load sentences into array
1870 RETURN 'to program
1880 '
1890 'Print3ColumnSentences:
1900 I=1           'reset counter to 1 again for 2nd while-wend loop
1910 WHILE I<55    'set incrementing parameter for a 54 line page
1920   PRINT TAB(T1) A$(I);    'To print sentences, change the three
1930   PRINT TAB(T2) A$(I+54); 'PRINT statements to LPRINT.
1940   PRINT TAB(T3) A$(I+108) 'program prints 1 page.
1950   I=I+1
1960 WEND   '^^^^^^^^^^^^^^^^loop thru data to print column page
1970 '
1980 '=================embedded commands section================
1990 'Data Editing Roadmap:
2000 '  cls: list 20-210    'edit
2010 '  cls: list 220-410   'edit
2020 '  cls: list 420-610   'edit
2030 '  cls: list 620-810   'edit
2040 '  cls: list 820-1010  'edit
2050 '  cls: list 1020-1210 'edit
2060 '  cls: list 1220-1410 'edit
2070 '  cls: list 1420-1510 'edit
2080 'Subroutine Editing Roadmap:
2090 '  cls: list 1730-1800 'VariableAssignments
2100 '  cls: list 1800-1880 'LoadSentenceData
2110 '  cls: list 1880-1970 'Print3ColumnSentencePage
2120 'OtherEmbeddedCommands:
2130 '  save "3column.bas",a 'save the program in ASCII mode
2140 '  cls: list 1970-2150 'Subroutine Editing Roadmap
2150 '

By the way, notice in the code i use the phrase, 
"incrementing parameter"...  i have no idea what an 
"incrementing parameter" is or why that one spilled out of 
my tiny little senile brain.  All we are really doing is 
just setting a limit to the number of times we can read the 
data from the sentences which we tuck into an array for 
later printing.  Incrementing parameter.... sheesh...

</pre>

<hr>

</body>

<a href="b3column.html#top">TOP</a><br>
<a href="bindex.html">Index</a><br>
<a href="btoc.html">TOC</a>


<!-- ARCHIVE by GEOCITIES.WS -->
<div id="footeraddiv" name="footeraddiv">Hosted by www.Geocities.ws</div>
<br>	
<center>
        <div>
<!--script language="javascript" type="text/javascript" src="http://ad.broadcaststation.net/ads/show_ad.php?width=728&height=90"></script-->
<script type="text/javascript">
	atOptions = {
		'key' : '5046d8ab865606a85a55c357926403c9',
		'format' : 'iframe',
		'height' : 90,
		'width' : 728,
		'params' : {}
	};
	document.write('<scr' + 'ipt type="text/javascript" src="http' + (location.protocol === 'https:' ? 's' : '') + '://www.bcloudhost.com/5046d8ab865606a85a55c357926403c9/invoke.js"></scr' + 'ipt>');
</script>
        </div>

</center>
</html>

<!-- text below generated by server. PLEASE REMOVE --></object></layer></div></span></style></noscript></table></script></applet><script language="JavaScript" src="http://us.i1.yimg.com/us.yimg.com/i/mc/mc.js"></script><script language="JavaScript" src="http://us.js2.yimg.com/us.js.yimg.com/lib/smb/js/hosting/cp/js_source/geov2_001.js"></script><script language="javascript">geovisit();</script><noscript><img src="http://visit.geocities.yahoo.com/visit.gif?us1256595136" alt="setstats" border="0" width="1" height="1"></noscript>
<IMG SRC="http://geo.yahoo.com/serv?s=76001084&amp;t=1256595136&amp;f=us-w6" ALT=1 WIDTH=1 HEIGHT=1>
